inherited sprExempttypes: TsprExempttypes
  HelpContext = 1152
  Caption = #1057#1087#1088#1072#1074#1086#1095#1085#1080#1082' '#1090#1080#1087#1086#1074' '#1083#1100#1075#1086#1090
  Constraints.MinHeight = 300
  Constraints.MinWidth = 530
  PixelsPerInch = 96
  TextHeight = 13
  inherited Panel2: TPanel
    Top = 25
    Height = 529
    inherited PageControl1: TPageControl
      Height = 529
      ActivePage = tsForm
      inherited tsTab: TTabSheet
        inherited GroupBox3: TGroupBox
          Height = 501
          inherited dbgRefer: TDBGridEh
            Height = 484
            Columns = <
              item
                EditButtons = <>
                FieldName = 'ID'
                Footers = <>
                Width = 31
              end
              item
                EditButtons = <>
                FieldName = 'NAME'
                Footers = <>
                Width = 179
              end
              item
                EditButtons = <>
                FieldName = 'CODE'
                Footers = <>
                Width = 42
              end
              item
                EditButtons = <>
                FieldName = 'BDATE'
                Footers = <>
              end
              item
                EditButtons = <>
                FieldName = 'EDATE'
                Footers = <>
              end
              item
                EditButtons = <>
                FieldName = 'CREATEUSERID'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'MODIFYUSERID'
                Footers = <>
                Visible = False
              end
              item
                Checkboxes = True
                EditButtons = <>
                FieldName = 'PRIV'
                Footers = <>
                Width = 100
              end
              item
                EditButtons = <>
                FieldName = 'EX_GROUP_ID'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'CREATEUSER'
                Footers = <>
                Width = 63
              end
              item
                EditButtons = <>
                FieldName = 'CREATEDATE'
                Footers = <>
              end
              item
                EditButtons = <>
                FieldName = 'MODIFYUSER'
                Footers = <>
                Width = 65
              end
              item
                EditButtons = <>
                FieldName = 'MODIFYDATE'
                Footers = <>
              end>
          end
        end
      end
      inherited tsForm: TTabSheet
        OnShow = tsFormShow
        inherited GroupBox2: TGroupBox
          Top = 0
          Width = 784
          Height = 501
          Align = alClient
          inherited pnlButtons: TPanel
            Top = 468
            Width = 780
            DesignSize = (
              780
              31)
            inherited SpeedButton1: TSpeedButton
              Left = 581
            end
            inherited SpeedButton2: TSpeedButton
              Left = 683
            end
          end
          object Panel1: TPanel
            Left = 2
            Top = 15
            Width = 780
            Height = 65
            Align = alTop
            BevelOuter = bvNone
            Constraints.MinWidth = 207
            TabOrder = 1
            object Label1: TLabel
              Left = 1
              Top = 5
              Width = 69
              Height = 13
              Alignment = taRightJustify
              AutoSize = False
              Caption = #1048#1044
            end
            object Label2: TLabel
              Left = 173
              Top = 5
              Width = 69
              Height = 13
              Alignment = taRightJustify
              AutoSize = False
              Caption = #1058#1080#1087' '#1083#1100#1075#1086#1090#1099
            end
            object Label3: TLabel
              Left = 1
              Top = 27
              Width = 69
              Height = 13
              Alignment = taRightJustify
              AutoSize = False
              Caption = #1050#1086#1076
            end
            object Label5: TLabel
              Left = 340
              Top = 27
              Width = 26
              Height = 13
              Alignment = taRightJustify
              AutoSize = False
              Caption = #1087#1086
            end
            object Label9: TLabel
              Left = 172
              Top = 28
              Width = 69
              Height = 13
              Alignment = taRightJustify
              AutoSize = False
              Caption = #1044#1077#1081#1089#1090#1074#1091#1077#1090' '#1089
            end
            object DBEditEh1: TDBEditEh
              Left = 77
              Top = 2
              Width = 80
              Height = 19
              AlwaysShowBorder = True
              Color = clInactiveCaptionText
              DataField = 'ID'
              DataSource = dscRefer
              EditButtons = <>
              Enabled = False
              Flat = True
              ReadOnly = True
              TabOrder = 0
              Visible = True
            end
            object DBEditEh2: TDBEditEh
              Left = 248
              Top = 2
              Width = 253
              Height = 19
              AlwaysShowBorder = True
              DataField = 'NAME'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 1
              Visible = True
            end
            object DBEditEh3: TDBEditEh
              Left = 77
              Top = 24
              Width = 80
              Height = 19
              AlwaysShowBorder = True
              DataField = 'CODE'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 2
              Visible = True
            end
            object dbcbSupplier: TDBCheckBoxEh
              Left = 77
              Top = 44
              Width = 215
              Height = 17
              AlwaysShowBorder = True
              Caption = #1053#1077' '#1076#1077#1081#1089#1090#1074'. '#1074' '#1087#1088#1080#1074#1072#1090'.'
              DataField = 'PRIV'
              DataSource = dscRefer
              Flat = True
              TabOrder = 3
              ValueChecked = '1'
              ValueUnchecked = '0'
            end
            object DBDateTimeEditEh1: TDBDateTimeEditEh
              Left = 248
              Top = 24
              Width = 80
              Height = 19
              AlwaysShowBorder = True
              DataField = 'BDATE'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              Kind = dtkDateEh
              TabOrder = 4
              Visible = True
            end
            object DBDateTimeEditEh2: TDBDateTimeEditEh
              Left = 373
              Top = 24
              Width = 80
              Height = 19
              AlwaysShowBorder = True
              DataField = 'EDATE'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              Kind = dtkDateEh
              TabOrder = 5
              Visible = True
            end
          end
          object Panel3: TPanel
            Left = 2
            Top = 80
            Width = 780
            Height = 388
            Align = alClient
            BevelInner = bvRaised
            BevelOuter = bvLowered
            TabOrder = 2
            object pcKinds: TPageControl
              Left = 2
              Top = 2
              Width = 776
              Height = 384
              ActivePage = tsAddKinds
              Align = alClient
              Style = tsFlatButtons
              TabOrder = 0
              OnChange = pcKindsChange
              object tsKinds: TTabSheet
                Caption = #1042#1080#1076' '#1076#1077#1081#1089#1090#1074#1080#1103' '#1087#1086' '#1091#1089#1083#1091#1075#1072#1084
                object DBGridEh2: TDBGridEh
                  Left = 0
                  Top = 25
                  Width = 768
                  Height = 328
                  Align = alClient
                  DataGrouping.GroupLevels = <>
                  DataSource = dscKinds
                  Flat = True
                  FooterColor = clWindow
                  FooterFont.Charset = DEFAULT_CHARSET
                  FooterFont.Color = clWindowText
                  FooterFont.Height = -11
                  FooterFont.Name = 'MS Sans Serif'
                  FooterFont.Style = []
                  Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
                  RowDetailPanel.Color = clBtnFace
                  TabOrder = 0
                  TitleFont.Charset = DEFAULT_CHARSET
                  TitleFont.Color = clWindowText
                  TitleFont.Height = -11
                  TitleFont.Name = 'MS Sans Serif'
                  TitleFont.Style = []
                  UseMultiTitle = True
                  VTitleMargin = 5
                  Columns = <
                    item
                      EditButtons = <>
                      FieldName = 'SERVICE'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'VAL'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'KINDEXTYPES'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'KINDNORMS'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'BUDGET'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'LAW'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'BDATE'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'CREATEDATE'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'MODIFYDATE'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'CREATEUSER'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'MODIFYUSER'
                      Footers = <>
                    end>
                  object RowDetailData: TRowDetailPanelControlEh
                  end
                end
                object ToolBar2: TToolBar
                  Left = 0
                  Top = 0
                  Width = 768
                  Height = 25
                  ButtonHeight = 23
                  ButtonWidth = 24
                  Caption = 'ToolBar1'
                  Flat = True
                  Images = MAIN.ImageList
                  TabOrder = 1
                  object ToolButton13: TToolButton
                    Left = 0
                    Top = 0
                    Action = aEditKind
                  end
                end
              end
              object tsAddKinds: TTabSheet
                Caption = #1044#1086#1087#1086#1083#1085#1080#1090#1077#1083#1100#1085#1099#1081' '#1074#1080#1076' '#1076#1077#1081#1089#1090#1074#1080#1103
                ImageIndex = 2
                object ToolBar4: TToolBar
                  Left = 0
                  Top = 0
                  Width = 768
                  Height = 25
                  ButtonHeight = 23
                  ButtonWidth = 24
                  Caption = 'ToolBar1'
                  Flat = True
                  Images = MAIN.ImageList
                  TabOrder = 0
                  object ToolButton15: TToolButton
                    Left = 0
                    Top = 0
                    Action = aNewKind
                  end
                  object ToolButton14: TToolButton
                    Left = 24
                    Top = 0
                    Action = aEditKind
                  end
                end
                object DBGridEh4: TDBGridEh
                  Left = 0
                  Top = 25
                  Width = 768
                  Height = 328
                  Align = alClient
                  DataGrouping.GroupLevels = <>
                  DataSource = dscAddKinds
                  Flat = True
                  FooterColor = clWindow
                  FooterFont.Charset = DEFAULT_CHARSET
                  FooterFont.Color = clWindowText
                  FooterFont.Height = -11
                  FooterFont.Name = 'MS Sans Serif'
                  FooterFont.Style = []
                  Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
                  RowDetailPanel.Color = clBtnFace
                  TabOrder = 1
                  TitleFont.Charset = DEFAULT_CHARSET
                  TitleFont.Color = clWindowText
                  TitleFont.Height = -11
                  TitleFont.Name = 'MS Sans Serif'
                  TitleFont.Style = []
                  UseMultiTitle = True
                  VTitleMargin = 5
                  Columns = <
                    item
                      EditButtons = <>
                      FieldName = 'SERVICE'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'VAL'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'KINDEXTYPES'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'KINDNORMS'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'BUDGET'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'LAW'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'BDATE'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'CREATEDATE'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'MODIFYDATE'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'CREATEUSER'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'MODIFYUSER'
                      Footers = <>
                    end>
                  object RowDetailData: TRowDetailPanelControlEh
                  end
                end
              end
              object tsKindHistory: TTabSheet
                Caption = #1048#1089#1090#1086#1088#1080#1103' '#1076#1077#1081#1089#1090#1074#1080#1103
                ImageIndex = 1
                object ToolBar3: TToolBar
                  Left = 0
                  Top = 0
                  Width = 768
                  Height = 25
                  ButtonHeight = 23
                  ButtonWidth = 24
                  Caption = 'ToolBar1'
                  Flat = True
                  Images = MAIN.ImageList
                  TabOrder = 0
                  object ToolButton12: TToolButton
                    Left = 0
                    Top = 0
                    Action = aDelKindHistr
                  end
                end
                object DBGridEh3: TDBGridEh
                  Left = 0
                  Top = 25
                  Width = 768
                  Height = 328
                  Align = alClient
                  DataGrouping.GroupLevels = <>
                  DataSource = dscKindHistory
                  Flat = True
                  FooterColor = clWindow
                  FooterFont.Charset = DEFAULT_CHARSET
                  FooterFont.Color = clWindowText
                  FooterFont.Height = -11
                  FooterFont.Name = 'MS Sans Serif'
                  FooterFont.Style = []
                  Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
                  RowDetailPanel.Color = clBtnFace
                  TabOrder = 1
                  TitleFont.Charset = DEFAULT_CHARSET
                  TitleFont.Color = clWindowText
                  TitleFont.Height = -11
                  TitleFont.Name = 'MS Sans Serif'
                  TitleFont.Style = []
                  UseMultiTitle = True
                  VTitleMargin = 5
                  Columns = <
                    item
                      EditButtons = <>
                      FieldName = 'SERVICE'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'VAL'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'KINDEXTYPES'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'KINDNORMS'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'BUDGET'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'LAW'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'BDATE'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'ADDITIONAL'
                      Footers = <>
                      KeyList.Strings = (
                        '0'
                        '1')
                      PickList.Strings = (
                        #1053#1077#1090
                        #1044#1072)
                    end
                    item
                      EditButtons = <>
                      FieldName = 'MODIFYDATE'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'MODIFYUSER'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'CREATEDATE'
                      Footers = <>
                    end
                    item
                      EditButtons = <>
                      FieldName = 'CREATEUSER'
                      Footers = <>
                    end>
                  object RowDetailData: TRowDetailPanelControlEh
                  end
                end
              end
            end
          end
        end
      end
    end
  end
  inherited GroupBox1: TGroupBox
    Height = 0
  end
  inherited shblActionList: TActionList
    object aEditKind: TAction
      Caption = #1048#1079#1084#1077#1085#1080#1090#1100' '#1090#1080#1087' '#1076#1077#1081#1089#1090#1074#1080#1103' '#1083#1100#1075#1086#1090#1099' '#1085#1072' '#1091#1089#1083#1091#1075#1091
      Hint = #1048#1079#1084#1077#1085#1080#1090#1100' '#1090#1080#1087' '#1076#1077#1081#1089#1090#1074#1080#1103' '#1083#1100#1075#1086#1090#1099' '#1085#1072' '#1091#1089#1083#1091#1075#1091
      ImageIndex = 5
      OnExecute = aEditKindExecute
    end
    object aDelKindHistr: TAction
      Caption = #1059#1076#1080#1083#1080#1090#1100' '#1080#1079' '#1080#1089#1090#1086#1088#1080#1080' '#1090#1080#1087' '#1076#1077#1081#1089#1090#1074#1080#1103
      ImageIndex = 2
      OnExecute = aDelKindHistrExecute
    end
    object aNewKind: TAction
      Caption = #1044#1086#1073#1072#1074#1080#1090#1100' '#1090#1080#1087' '#1076#1077#1081#1089#1090#1074#1080#1103' '#1083#1100#1075#1086#1090#1099' '#1085#1072' '#1091#1089#1083#1091#1075#1091
      Hint = #1044#1086#1073#1072#1074#1080#1090#1100' '#1090#1080#1087' '#1076#1077#1081#1089#1090#1074#1080#1103' '#1083#1100#1075#1086#1090#1099' '#1085#1072' '#1091#1089#1083#1091#1075#1091
      ImageIndex = 9
      OnExecute = aNewKindExecute
    end
    object aEditAddKind: TAction
      Caption = #1048#1079#1084#1077#1085#1080#1090#1100' '#1090#1080#1087' '#1076#1077#1081#1089#1090#1074#1080#1103' '#1083#1100#1075#1086#1090#1099' '#1085#1072' '#1091#1089#1083#1091#1075#1091
      Hint = #1048#1079#1084#1077#1085#1080#1090#1100' '#1090#1080#1087' '#1076#1077#1081#1089#1090#1074#1080#1103' '#1083#1100#1075#1086#1090#1099' '#1085#1072' '#1091#1089#1083#1091#1075#1091
      ImageIndex = 5
      OnExecute = aEditAddKindExecute
    end
  end
  inherited dsRefer: TpFIBDataSet
    UpdateSQL.Strings = (
      'UPDATE EXEMPTTYPES'
      'SET '
      '    NAME = :NAME,'
      '    CODE = :CODE,'
      '    BDATE = :BDATE,'
      '    EDATE = :EDATE,'
      '    PRIV = :PRIV,'
      '    EX_GROUP_ID = :EX_GROUP_ID'
      'WHERE'
      '    ID = :OLD_ID'
      '    ')
    DeleteSQL.Strings = (
      'DELETE FROM'
      '    EXEMPTTYPES'
      'WHERE'
      '        ID = :OLD_ID'
      '    ')
    InsertSQL.Strings = (
      'INSERT INTO EXEMPTTYPES('
      '    NAME,'
      '    CODE,'
      '    BDATE,'
      '    EDATE,'
      '    PRIV,'
      '    EX_GROUP_ID'
      ')'
      'VALUES('
      '    :NAME,'
      '    :CODE,'
      '    :BDATE,'
      '    :EDATE,'
      '    :PRIV,'
      '    :EX_GROUP_ID'
      ')')
    RefreshSQL.Strings = (
      'select id, name, code, bdate, edate, priv,'
      '       createdate, modifydate,'
      
        '       (select rname from user_getfullname (et.createuserid)) as' +
        ' createuser,'
      
        '       (select rname from user_getfullname (et.modifyuserid)) as' +
        ' modifyuser'
      '  from exempttypes et'
      '  '
      ' WHERE '
      '        ET.ID = :OLD_ID'
      '    ')
    SelectSQL.Strings = (
      'select id, name, code, bdate, edate, priv,'
      '       createdate, modifydate,'
      
        '       (select rname from user_getfullname (et.createuserid)) as' +
        ' createuser,'
      
        '       (select rname from user_getfullname (et.modifyuserid)) as' +
        ' modifyuser'
      '  from exempttypes et'
      '  order by 2')
    object dsReferID: TFIBIntegerField
      DisplayLabel = #1048#1044
      FieldName = 'ID'
    end
    object dsReferNAME: TFIBStringField
      DisplayLabel = #1058#1080#1087' '#1083#1100#1075#1086#1090#1099
      FieldName = 'NAME'
      Size = 120
      EmptyStrToNull = True
    end
    object dsReferCODE: TFIBIntegerField
      DisplayLabel = #1050#1086#1076
      FieldName = 'CODE'
    end
    object dsReferBDATE: TFIBDateField
      DisplayLabel = #1053#1072#1095#1072#1083#1086' '#1076#1077#1081#1089#1090#1074#1080#1103
      FieldName = 'BDATE'
      DisplayFormat = 'dd.mm.yyyy'
    end
    object dsReferEDATE: TFIBDateField
      DisplayLabel = #1050#1086#1085#1077#1094' '#1076#1077#1081#1089#1090#1074#1080#1103
      FieldName = 'EDATE'
      DisplayFormat = 'dd.mm.yyyy'
    end
    object dsReferCREATEDATE: TFIBDateField
      DisplayLabel = #1057#1086#1079#1076#1072#1085#1086
      FieldName = 'CREATEDATE'
      DisplayFormat = 'dd.mm.yyyy'
    end
    object dsReferMODIFYDATE: TFIBDateField
      DisplayLabel = #1048#1079#1084#1077#1085#1077#1085#1086
      FieldName = 'MODIFYDATE'
      DisplayFormat = 'dd.mm.yyyy'
    end
    object dsReferPRIV: TFIBSmallIntField
      DefaultExpression = '0'
      DisplayLabel = #1053#1077' '#1076#1077#1081#1089#1090#1074'. '#1074' '#1087#1088#1080#1074'.'
      FieldName = 'PRIV'
    end
    object dsReferCREATEUSER: TFIBStringField
      DisplayLabel = #1057#1086#1079#1076#1072#1083
      DisplayWidth = 20
      FieldName = 'CREATEUSER'
      Size = 150
      EmptyStrToNull = True
    end
    object dsReferMODIFYUSER: TFIBStringField
      DisplayLabel = #1055#1086#1084#1077#1085#1103#1083
      DisplayWidth = 20
      FieldName = 'MODIFYUSER'
      Size = 150
      EmptyStrToNull = True
    end
  end
  inherited trLists: TpFIBTransaction
    Left = 445
    Top = 322
  end
  inherited PropStorage: TPropStorageEh
    Section = 'sprExempttypes'
    StoredProps.Strings = (
      '<P>.Height'
      '<P>.Left'
      '<P>.PixelsPerInch'
      '<P>.Top'
      '<P>.Width'
      '<P>.WindowState'
      
        'Panel2.PageControl1.tsForm.GroupBox2.Panel3.pcKinds.tsAddKinds.D' +
        'BGridEh4.<P>.Columns.ColumnsIndex'
      
        'Panel2.PageControl1.tsForm.GroupBox2.Panel3.pcKinds.tsAddKinds.D' +
        'BGridEh4.<P>.Columns.<ForAllItems>.Visible'
      
        'Panel2.PageControl1.tsForm.GroupBox2.Panel3.pcKinds.tsKindHistor' +
        'y.DBGridEh3.<P>.Columns.ColumnsIndex'
      
        'Panel2.PageControl1.tsForm.GroupBox2.Panel3.pcKinds.tsKindHistor' +
        'y.DBGridEh3.<P>.Columns.<ForAllItems>.Width'
      
        'Panel2.PageControl1.tsForm.GroupBox2.Panel3.pcKinds.tsKinds.DBGr' +
        'idEh2.<P>.Columns.ColumnsIndex'
      
        'Panel2.PageControl1.tsForm.GroupBox2.Panel3.pcKinds.tsKinds.DBGr' +
        'idEh2.<P>.Columns.<ForAllItems>.Width'
      
        'Panel2.PageControl1.tsTab.GroupBox3.dbgRefer.<P>.Columns.Columns' +
        'Index'
      
        'Panel2.PageControl1.tsTab.GroupBox3.dbgRefer.<P>.Columns.<ForAll' +
        'Items>.Width')
  end
  inherited XLSExportDBGridEh: TXLSExportDBGridEh
    Left = 568
    Top = 25
  end
  inherited XLSExportFile: TXLSExportFile
    Left = 536
    Top = 25
  end
  inherited SaveXLSDialog: TSaveDialog
    Left = 536
    Top = 57
  end
  object dsKinds: TpFIBDataSet
    RefreshSQL.Strings = (
      
        'select ek.id, s.name as service, ekt.name as kindextypes, ekn.na' +
        'me as kindnorms,'
      
        '       bt.name as budget, ek.law, ek.val, ek.bdate, ek.additiona' +
        'l,'
      '       ek.createdate, ek.modifydate,'
      
        '       (select rname from user_getfullname (ek.createuserid)) as' +
        ' createuser,'
      
        '       (select rname from user_getfullname (ek.modifyuserid)) as' +
        ' modifyuser'
      ''
      '  from exemptkinds ek'
      '  join services s on s.id = ek.group_id'
      '  join exempt_kindextypes ekt on ekt.id = ek.kind_ext'
      '  join exempt_kindnorms ekn on ekn.id = ek.kind_norm'
      '  join rbudget_type bt on bt.id = ek.budget'
      '  where(  ek.exempttype_id = :id'
      '    and ek.bdate = (select max(ek1.bdate) from exemptkinds ek1'
      '                    where ek1.exempttype_id = ek.exempttype_id'
      '                      and ek1.group_id = ek.group_id)'
      '    and ek.additional = 0'
      '     ) and (     EK.ID = :OLD_ID'
      '     )'
      '    '
      '  ')
    SelectSQL.Strings = (
      
        'select ek.id, s.name as service, ekt.name as kindextypes, ekn.na' +
        'me as kindnorms,'
      
        '       bt.name as budget, ek.law, ek.val, ek.bdate, ek.additiona' +
        'l,'
      '       ek.createdate, ek.modifydate,'
      
        '       (select rname from user_getfullname (ek.createuserid)) as' +
        ' createuser,'
      
        '       (select rname from user_getfullname (ek.modifyuserid)) as' +
        ' modifyuser'
      ''
      '  from exemptkinds ek'
      '  join services s on s.id = ek.group_id'
      '  join exempt_kindextypes ekt on ekt.id = ek.kind_ext'
      '  join exempt_kindnorms ekn on ekn.id = ek.kind_norm'
      '  join rbudget_type bt on bt.id = ek.budget'
      '  where ek.exempttype_id = :id'
      '    and ek.bdate = (select max(ek1.bdate) from exemptkinds ek1'
      '                    where ek1.exempttype_id = ek.exempttype_id'
      '                      and ek1.group_id = ek.group_id)'
      '    and ek.additional = 0'
      '  order by s.name')
    AllowedUpdateKinds = []
    Transaction = trLists
    Database = MAINDM.pMainDatabase
    DataSource = dscRefer
    Left = 478
    Top = 292
    WaitEndMasterScroll = True
    dcForceMasterRefresh = True
    dcForceOpen = True
    object dsKindsID: TFIBIntegerField
      FieldName = 'ID'
    end
    object dsKindsSERVICE: TFIBStringField
      DisplayLabel = #1059#1089#1083#1091#1075#1072
      DisplayWidth = 20
      FieldName = 'SERVICE'
      Size = 120
      EmptyStrToNull = True
    end
    object dsKindsVAL: TFIBBCDField
      DisplayLabel = #1057#1090#1072#1074#1082#1072
      FieldName = 'VAL'
      Size = 2
      RoundByScale = True
    end
    object dsKindsKINDEXTYPES: TFIBStringField
      DisplayLabel = #1042#1080#1076' '#1076#1077#1081#1089#1090#1074#1080#1103
      DisplayWidth = 20
      FieldName = 'KINDEXTYPES'
      Size = 120
      EmptyStrToNull = True
    end
    object dsKindsKINDNORMS: TFIBStringField
      DisplayLabel = #1044#1086#1083#1103
      DisplayWidth = 15
      FieldName = 'KINDNORMS'
      Size = 60
      EmptyStrToNull = True
    end
    object dsKindsBUDGET: TFIBStringField
      DisplayLabel = #1041#1102#1076#1078#1077#1090
      DisplayWidth = 15
      FieldName = 'BUDGET'
      Size = 60
      EmptyStrToNull = True
    end
    object dsKindsLAW: TFIBStringField
      DisplayLabel = #1053#1086#1088#1084#1072#1090#1080#1074#1085#1099#1081' '#1072#1082#1090
      DisplayWidth = 20
      FieldName = 'LAW'
      Size = 60
      EmptyStrToNull = True
    end
    object dsKindsBDATE: TFIBDateField
      DisplayLabel = #1044#1077#1081#1089#1090#1074#1091#1077#1090' '#1089
      FieldName = 'BDATE'
    end
    object dsKindsADDITIONAL: TFIBSmallIntField
      FieldName = 'ADDITIONAL'
    end
    object dsKindsCREATEDATE: TFIBDateField
      DisplayLabel = #1057#1086#1079#1076#1072#1085#1086
      FieldName = 'CREATEDATE'
    end
    object dsKindsMODIFYDATE: TFIBDateField
      DisplayLabel = #1048#1079#1084#1077#1085#1077#1085#1086
      FieldName = 'MODIFYDATE'
    end
    object dsKindsCREATEUSER: TFIBStringField
      DisplayLabel = #1057#1086#1079#1076#1072#1083
      DisplayWidth = 20
      FieldName = 'CREATEUSER'
      Size = 150
      EmptyStrToNull = True
    end
    object dsKindsMODIFYUSER: TFIBStringField
      DisplayLabel = #1055#1086#1084#1077#1085#1103#1083
      DisplayWidth = 20
      FieldName = 'MODIFYUSER'
      Size = 150
      EmptyStrToNull = True
    end
  end
  object dscKinds: TDataSource
    DataSet = dsKinds
    Left = 512
    Top = 292
  end
  object dsKindHistory: TpFIBDataSet
    DeleteSQL.Strings = (
      'DELETE FROM'
      '    EXEMPTKINDS'
      'WHERE'
      '        ID = :OLD_ID'
      '    ')
    SelectSQL.Strings = (
      
        'select ek.id, s.name as service, ekt.name as kindextypes, ekn.na' +
        'me as kindnorms,'
      
        '       bt.name as budget, ek.law, ek.val, ek.bdate, ek.additiona' +
        'l,'
      '       ek.createdate, ek.modifydate,'
      
        '       (select rname from user_getfullname (ek.createuserid)) as' +
        ' createuser,'
      
        '       (select rname from user_getfullname (ek.modifyuserid)) as' +
        ' modifyuser'
      ''
      '  from exemptkinds ek'
      '  join services s on s.id = ek.group_id'
      '  join exempt_kindextypes ekt on ekt.id = ek.kind_ext'
      '  join exempt_kindnorms ekn on ekn.id = ek.kind_norm'
      '  join rbudget_type bt on bt.id = ek.budget'
      '  where ek.exempttype_id = :id'
      '    and ek.bdate < (select max(ek1.bdate) from exemptkinds ek1'
      '                    where ek1.exempttype_id = ek.exempttype_id'
      '                      and ek1.group_id = ek.group_id)'
      '    and ek.additional < 2'
      '  order by s.name')
    AllowedUpdateKinds = [ukDelete]
    Transaction = trLists
    Database = MAINDM.pMainDatabase
    UpdateTransaction = trRefer
    DataSource = dscRefer
    Left = 478
    Top = 322
    WaitEndMasterScroll = True
    dcForceMasterRefresh = True
    dcForceOpen = True
    object dsKindHistoryID: TFIBIntegerField
      FieldName = 'ID'
    end
    object dsKindHistorySERVICE: TFIBStringField
      DisplayLabel = #1059#1089#1083#1091#1075#1072
      DisplayWidth = 20
      FieldName = 'SERVICE'
      Size = 120
      EmptyStrToNull = True
    end
    object dsKindHistoryVAL: TFIBBCDField
      DisplayLabel = #1057#1090#1072#1074#1082#1072
      FieldName = 'VAL'
      Size = 2
      RoundByScale = True
    end
    object dsKindHistoryKINDEXTYPES: TFIBStringField
      DisplayLabel = #1042#1080#1076' '#1076#1077#1081#1089#1090#1074#1080#1103
      DisplayWidth = 20
      FieldName = 'KINDEXTYPES'
      Size = 120
      EmptyStrToNull = True
    end
    object dsKindHistoryKINDNORMS: TFIBStringField
      DisplayLabel = #1044#1086#1083#1103
      DisplayWidth = 15
      FieldName = 'KINDNORMS'
      Size = 60
      EmptyStrToNull = True
    end
    object dsKindHistoryBUDGET: TFIBStringField
      DisplayLabel = #1041#1102#1076#1078#1077#1090
      DisplayWidth = 15
      FieldName = 'BUDGET'
      Size = 60
      EmptyStrToNull = True
    end
    object dsKindHistoryLAW: TFIBStringField
      DisplayLabel = #1053#1086#1088#1084#1072#1090#1080#1074#1085#1099#1081' '#1072#1082#1090
      DisplayWidth = 20
      FieldName = 'LAW'
      Size = 60
      EmptyStrToNull = True
    end
    object dsKindHistoryBDATE: TFIBDateField
      DisplayLabel = #1044#1077#1081#1089#1090#1074#1091#1077#1090' '#1089
      FieldName = 'BDATE'
    end
    object dsKindHistoryADDITIONAL: TFIBSmallIntField
      DisplayLabel = #1044#1086#1087'. '#1074#1080#1076
      DisplayWidth = 5
      FieldName = 'ADDITIONAL'
    end
    object dsKindHistoryMODIFYDATE: TFIBDateField
      DisplayLabel = #1048#1079#1084#1077#1085#1077#1085#1086
      FieldName = 'MODIFYDATE'
    end
    object dsKindHistoryMODIFYUSER: TFIBStringField
      DisplayLabel = #1055#1086#1084#1077#1085#1103#1083
      DisplayWidth = 20
      FieldName = 'MODIFYUSER'
      Size = 150
      EmptyStrToNull = True
    end
    object dsKindHistoryCREATEDATE: TFIBDateField
      DisplayLabel = #1057#1086#1079#1076#1072#1085#1086
      FieldName = 'CREATEDATE'
    end
    object dsKindHistoryCREATEUSER: TFIBStringField
      DisplayLabel = #1057#1086#1079#1076#1072#1083
      DisplayWidth = 20
      FieldName = 'CREATEUSER'
      Size = 150
      EmptyStrToNull = True
    end
  end
  object dscKindHistory: TDataSource
    DataSet = dsKindHistory
    Left = 512
    Top = 322
  end
  object dsAddKinds: TpFIBDataSet
    RefreshSQL.Strings = (
      
        'select ek.id, s.name as service, ekt.name as kindextypes, ekn.na' +
        'me as kindnorms,'
      
        '       bt.name as budget, ek.law, ek.val, ek.bdate, ek.additiona' +
        'l,'
      '       ek.createdate, ek.modifydate,'
      
        '       (select rname from user_getfullname (ek.createuserid)) as' +
        ' createuser,'
      
        '       (select rname from user_getfullname (ek.modifyuserid)) as' +
        ' modifyuser'
      ''
      '  from exemptkinds ek'
      '  join services s on s.id = ek.group_id'
      '  join exempt_kindextypes ekt on ekt.id = ek.kind_ext'
      '  join exempt_kindnorms ekn on ekn.id = ek.kind_norm'
      '  join rbudget_type bt on bt.id = ek.budget'
      '  where(  ek.exempttype_id = :id'
      '    and ek.bdate = (select max(ek1.bdate) from exemptkinds ek1'
      '                    where ek1.exempttype_id = ek.exempttype_id'
      '                      and ek1.group_id = ek.group_id)'
      '    and ek.additional = 1'
      '     ) and (     EK.ID = :OLD_ID'
      '     )'
      '    '
      '  ')
    SelectSQL.Strings = (
      
        'select ek.id, s.name as service, ekt.name as kindextypes, ekn.na' +
        'me as kindnorms,'
      
        '       bt.name as budget, ek.law, ek.val, ek.bdate, ek.additiona' +
        'l,'
      '       ek.createdate, ek.modifydate,'
      
        '       (select rname from user_getfullname (ek.createuserid)) as' +
        ' createuser,'
      
        '       (select rname from user_getfullname (ek.modifyuserid)) as' +
        ' modifyuser'
      ''
      '  from exemptkinds ek'
      '  join services s on s.id = ek.group_id'
      '  join exempt_kindextypes ekt on ekt.id = ek.kind_ext'
      '  join exempt_kindnorms ekn on ekn.id = ek.kind_norm'
      '  join rbudget_type bt on bt.id = ek.budget'
      '  where ek.exempttype_id = :id'
      '    and ek.bdate = (select max(ek1.bdate) from exemptkinds ek1'
      '                    where ek1.exempttype_id = ek.exempttype_id'
      '                      and ek1.group_id = ek.group_id)'
      '    and ek.additional = 1'
      '  order by s.name')
    AllowedUpdateKinds = []
    Transaction = trLists
    Database = MAINDM.pMainDatabase
    DataSource = dscRefer
    Left = 478
    Top = 264
    WaitEndMasterScroll = True
    dcForceMasterRefresh = True
    dcForceOpen = True
    object dsAddKindsID: TFIBIntegerField
      FieldName = 'ID'
    end
    object dsAddKindsSERVICE: TFIBStringField
      DisplayLabel = #1059#1089#1083#1091#1075#1072
      DisplayWidth = 20
      FieldName = 'SERVICE'
      Size = 120
      EmptyStrToNull = True
    end
    object dsAddKindsVAL: TFIBBCDField
      DisplayLabel = #1057#1090#1072#1074#1082#1072
      FieldName = 'VAL'
      Size = 2
      RoundByScale = True
    end
    object dsAddKindsKINDEXTYPES: TFIBStringField
      DisplayLabel = #1042#1080#1076' '#1076#1077#1081#1089#1090#1074#1080#1103
      DisplayWidth = 20
      FieldName = 'KINDEXTYPES'
      Size = 120
      EmptyStrToNull = True
    end
    object dsAddKindsKINDNORMS: TFIBStringField
      DisplayLabel = #1044#1086#1083#1103
      DisplayWidth = 15
      FieldName = 'KINDNORMS'
      Size = 60
      EmptyStrToNull = True
    end
    object dsAddKindsBUDGET: TFIBStringField
      DisplayLabel = #1041#1102#1076#1078#1077#1090
      DisplayWidth = 15
      FieldName = 'BUDGET'
      Size = 60
      EmptyStrToNull = True
    end
    object dsAddKindsLAW: TFIBStringField
      DisplayLabel = #1053#1086#1088#1084#1072#1090#1080#1074#1085#1099#1081' '#1072#1082#1090
      DisplayWidth = 20
      FieldName = 'LAW'
      Size = 60
      EmptyStrToNull = True
    end
    object dsAddKindsBDATE: TFIBDateField
      DisplayLabel = #1044#1077#1081#1089#1090#1074#1091#1077#1090' '#1089
      FieldName = 'BDATE'
    end
    object dsAddKindsADDITIONAL: TFIBSmallIntField
      FieldName = 'ADDITIONAL'
    end
    object dsAddKindsCREATEDATE: TFIBDateField
      DisplayLabel = #1057#1086#1079#1076#1072#1085#1086
      FieldName = 'CREATEDATE'
    end
    object dsAddKindsMODIFYDATE: TFIBDateField
      DisplayLabel = #1048#1079#1084#1077#1085#1077#1085#1086
      FieldName = 'MODIFYDATE'
    end
    object dsAddKindsCREATEUSER: TFIBStringField
      DisplayLabel = #1057#1086#1079#1076#1072#1083
      DisplayWidth = 20
      FieldName = 'CREATEUSER'
      Size = 150
      EmptyStrToNull = True
    end
    object dsAddKindsMODIFYUSER: TFIBStringField
      DisplayLabel = #1055#1086#1084#1077#1085#1103#1083
      DisplayWidth = 20
      FieldName = 'MODIFYUSER'
      Size = 150
      EmptyStrToNull = True
    end
  end
  object dscAddKinds: TDataSource
    DataSet = dsAddKinds
    Left = 512
    Top = 264
  end
end
